<?php
namespace Admin\Model;
use Think\Model;
class ManagerModel extends Model{
	public $_validate	=	array(
		array('username','/^[a-z]\w{3,}$/i','用户名格式错误'),
		array('realname','require','真实姓名必须'),
		array('password','require','密码必须'),
		array('username','','帐号已经存在',self::EXISTS_VALIDATE,'unique',self::MODEL_BOTH),
		);

	public $_auto=array(
		array('password','md5',self::MODEL_BOTH,'function'),
		array('logintime','time',self::MODEL_UPDATE,'function'),
		array('createtime','time',self::MODEL_INSERT,'function'),
		);
}